{extend name="common/common" /}        
        <!-- End of header area -->
        <!-- Start Breadcrumbs Area -->
        {block name="head"}
        <div class="breadcrumbs-area section-padding">
            <div class="container">
                <div class="row">
                    <div class="col-md-12">
                        <div class="breadcrumbs text-center text-white">
                            <h3 class="text-uppercase">Login / Register</h3>
                            <ul class="breadcrumbs-list">
                                <li>
                                    <a href="__INDEX__index/index.html" title="Return to Home">Home</a>
                                </li>
                                <li>/</li>
                                <li>Login / Register</li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        {/block}
        <!-- End Of Breadcrumbs Area -->
        <!-- Start page content -->
        <section id="page-content" class="page-wrapper">
            <!-- Start Wishlist Area -->
            {block name="headcontent"}
            <div class="login-section section-padding">
                <div class="container">
                    <div class="row">
                        <div class="col-md-6">
                            <div class="registered-customers">
                                <div class="section-title text-uppercase mb-40">
                                    <h4>REGISTERED CUSTOMERS</h4>
                                </div>
                                <form action="#">
                                    <div class="login-account p-30 box-shadow">
                                        <p>If you have an account with us, Please log in.</p>
                                        <input type="text" placeholder="Email Address" name="name">
                                        <input type="password" placeholder="Password" name="password">
                                        <p><small><a href="__INDEX__#">Forgot our password?</a></small></p>
                                        <button type="submit" class="submit-btn">login</button>
                                    </div>
                                </form>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="registered-customers">
                                <div class="section-title text-uppercase mb-40">

                                    <h4>注册</h4>
                                </div>
                                <form action="{:url('check/checkUser')}" class="am-form" method="post">
                                    <div class="login-account p-30 box-shadow">
                                        <input type="text" placeholder="用户名" name="user">
                                        <input type="text" class="pho" placeholder="手机号码" name="pho">
                                        <div class="row">
                                            <div class="col-sm-6">
                                                <input type="text" name="phoVail" placeholder="验证码">
                                            </div>
                                            <div class="col-sm-6">
                                                <button type="button" class="submit-btn sendCode">获取验证码</button>
                                            </div>
                                        </div>
                                        <input type="text" placeholder="邮箱地址" name="email">
                                        <input type="password" placeholder="密码" name="pwd">
                                        <input type="password" placeholder="确认密码" name="agPwd">
                                        <div class="row">
                                            <div class="col-md-6">
                                                <button value="register" type="submit" name="up" class="submit-btn mt-15">马上注册!!!</button>
                                            </div>
                                            <div class="col-md-6">
                                                <button type="reset" class="submit-btn mt-15">清空</button>
                                            </div>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            {/block}
            {block name="js"}
            <script>
            var sendtime = 0;
            $('.sendCode').click(function(){
                var on = $(this);
                var pho = new FormData($('.am-form')[0]);
                $.ajax({
                    type:"post",
                    data: pho,
                    url :"{:url('check/phoVail')}",
                    contentType : false,
                    processData: false,
                    success: function(res){
                        console.log(res);
                        if(res==''){
                            $('.pho').attr('placeholder','请输入手机号码')
                            $('.pho').css("box-shadow","0px 0px 1px red")
                        }else
                        {
                            on.prop('disabled',true);
                            on.html('<span id="countdown">60</span>秒后重发');
                            sendtime++;
                            var count = setInterval(function()
                            {
                                var nub = $('#countdown').html();
                                nub--;
                                $('#countdown').html(nub);
                                if(nub <=1)
                                {
                                    clearInterval(count);
                                    $('.sendCode').prop('disabled',false);
                                    $('.sendCode').html('验证码重新发送');
                                }
                            },10)
                        }
                    }
                })
                if(sendtime==3){
                    $('.sendCode').prop('disabled',true);
                    $('.sendCode').html('验证码发送上限');
                }  
            })
            </script>
            {/block}

